/**
 * 统一弹窗
 */

var fatherBody = $(window.top.document.body);
var commDialogs = commDialogs || {};
commDialogs.prototype = {
		openModals:function(id){
	        var dialog = $('#' + id).html();
	        fatherBody.append(dialog);
	        $("#"+id).modal({
	            backdrop: false
	          });
	        $("#"+id).modal('show');
	        fatherBody.append("<div id='backdropId' class='modal-backdrop fade in'></div>");
		},
		closeModals:function(id,Func){
	        fatherBody.find("#"+id).on('hidden.bs.modal', function (e) {
	            fatherBody.find("#backdropId").remove();
	            fatherBody.find("#"+id).remove();
	            Func();
	        });
		}
		
}
